module.exports = function (api) {
    api.cache(false);
    const presets = [
        [
            '@vue/app',
            {
                useBuiltIns: 'entry',
                corejs: 2,
            },
        ],
        // '@babel/preset-env',
        [
            "@babel/preset-env", {
                "targets": {
                    "node": "current"
                }
            }
        ],
        // ["@vue/cli-plugin-babel/preset"],
        // [
        //   "@babel/preset-typescript",   // 引用Typescript插件
        //   {
        //     allExtensions: true,        // 支持所有文件扩展名
        //   },
        // ],
    ];
    const plugins = [
        // ["@babel/plugin-proposal-decorators", { "legacy": true }],
        // ["@babel/plugin-proposal-class-properties"],
        // ["@babel/plugin-proposal-object-rest-spread"],
        '@babel/transform-runtime',
        'transform-vue-jsx',
    ];
    return {
        presets,
        plugins,
        sourceType: 'unambiguous',
    };
};
